Save Referral Program
POST : http://<base_url>/digipay/v3/reward_promotion/referral_program
This api is used to assign bulk/internal products to the threshold of the agent and create a threshold detail
BODY PARAMS:-
Parameter | Type | Description | Value |
---|---|---|---|
referral_program_title | String | unique title for referral program | Customer Program |
referfrom_rewards_type | Int | Integer value showing the from_reward_type if value is 1 then reward_type is in cash and if value is 3 then reward_type is points | 1 |
referto_rewards_type | Int | Integer value showing the to_reward_type if value is 1 then reward_type is in cash and if value is 3 then reward_type is points | 1 |
referral_for | Int | it indicates user_type where user_type can be customer,agent and merchant | 1 |
expiry_date | Int | unix timestamp value in second defined as expiry day of the referral_program | 1 |
min_referrals | Int | integer value showing the min no of referral for user | 1 |
max_referral | Int | integer value showing the max no of referral for user | 1 |
referral_reward_users | Int | integer value wh,ich is showing whether referral_reward_users are from user,to user or both user | 1 |
referral_condition | Array of string | it is the combination of refer_type,refer and transaction where refer_type shows whether referral_condition set on refer or it is set on transaction | 1 |
message | String | unique referral program message to display | hello |
currency_id | String | unique currency_id assigned to the referral program | 7753ad6bd8cf48f5b1312fd21eb36588 |
HEADERS:-
Parameter | Type | Description | Value |
---|---|---|---|
Authorization | String | It is a combination of type and token to authenticate user for the given token | Token duik7309njdlkhdauhknksadhjkas986876sd873j |
CompanyID | String | Company_id is a unique primary id, that is represent company detail | 76bc712200ca444fa334f9e55e5fd7a8 |
Request Body:-
Request Example
curl --request POST \
--url http://192.168.1.102:8014/digipay/v3/reward_promotion/referral_program \
--header 'Authorization: Token duik7309njdlkhdauhknksadhjkas986876sd873j' \
--header 'CompanyID: 7753ad6bd8cf48f5b1312fd21eb36588' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"referral_program_title": "Customer Program",
"referfrom_rewards_type": 1,
"referto_rewards_type": 1,
"referral_for": 1,
"expiry_date": 1,
"min_referrals": 1,
"max_referral": 1,
"referral_reward_users": 1,
"message": "hello",
"currency_id": "7753ad6bd8cf48f5b1312fd21eb36588"
}
'
Response:-
Response 200(OK)
{
"success": 1,
"error": [],
"data": {
"message": "Referral Program saved successfully.",
"referral_program_id": "4428647ee7ed420487cd6899f51eaa63"
}
}
Response 400(BAD REQUEST)
{
"success": 0,
"error"": [1],
"data": {
"message": "BAD_REQUEST",
}
}
RESPONSES :-
Status Code | Description |
---|---|
200 | OK |
400 | BAD REQUEST |
404 | NOT FOUND |
500 | INTERNAL SERVER ERROR |